package org.llc.gof.creator.singleton.single2;

import java.lang.reflect.Constructor;

/**
 * @author lilichai
 */
public class SingleFactory {
	
	private static Single single;
	
	static {
		try {
			Class<?> clazz = Class.forName(Single.class.getName());
			Constructor<?> constructor = clazz.getDeclaredConstructor();
			constructor.setAccessible(true);
			single = (Single) constructor.newInstance();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public static Single getSingle() {
		return single;
	}
	

}
